<template>
    <div>
      <div class="content">
        <div class="header">
          <!-- 修改表单区域 -->
          <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <!-- <el-form-item label="商品信息" style="width: 200px">
              <el-select
                v-model="formInline.key_type"
                placeholder="请选择"
                style="width: 200px"
                @change="getselect1()"
              >
                <el-option
                  v-for="item in searchselectdata"
                  :key="item.value"
                  :label="item.lable"
                  :value="item.value"
                />
              </el-select>
            </el-form-item> -->
   
             <el-form-item label="搜索关键字">
              <el-input
                v-model="name"
                placeholder="请输入关键字"
                clearable
              />
            </el-form-item> 
        
     
  
            <el-form-item>
              <el-button type="primary" @click="submitSee">查询</el-button>
              <el-button type="primary" plain @click="onSubmit">重置</el-button>
              <el-button type="primary" @click="btnAdd">新增</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="area">
         
      
  
         <div class="table-area">
          
            <el-table
              border
              :data="dataList"
              stripe
              style="width: 100%;margin-top: 22px;"
             
            >
           
            <el-table-column
                prop="name"
                align="center"
                label="套餐名称"
                #default="scope"
             
              >
              </el-table-column>
              <el-table-column
                prop="price"
                align="center"
                label="套餐价格(元)"
                #default="scope"
             
              >
              </el-table-column>
              <el-table-column
                prop="_level_id_text"
                align="center"
                label="赠送级别"
                #default="scope"
             
              >
              </el-table-column>
              <el-table-column
                align="center"
                prop="commission_config_str"
                label="分佣"
                #default="scope"
              >
           
              </el-table-column>
              <el-table-column
                align="center"
                prop="create_time"
                label="创建时间"
                #default="scope"
              >
           
              </el-table-column>
             
              <el-table-column
                prop="_vip_type_text"
                align="center"
                label="分站版本"
                #default="scope"
               
              >
           
              </el-table-column>
  
            
            
            
              <el-table-column
                align="center"
                prop="status_btn"
                label="状态"
                #default="scope"
              >
              <el-switch v-model="scope.row.status_btn"  @change="getChange(scope.row)"/>
            </el-table-column>
           
              <el-table-column
                align="center"
                fixed="right"
                label="操作"
                width="180px"
              >
                <template #default="scope">
                  <div>
                      <el-button
                      type="primary"
                      
                      size="small"
                     @click="btnEditn(scope.row)"
                      style="margin-bottom: 5px"
                      >编辑</el-button
                    >
                    <!-- <el-button
                      type="danger"
                      plain
                      size="small"
                      @click="shenji(scope.row, 0)"
                      style="margin-bottom: 5px"
                      >删除</el-button
                    > -->
                  </div>
                </template>
              </el-table-column>
            </el-table>
            <div class="pagination-container">
            <el-pagination
              :current-page="currentPage"
              :page-size="pageSize"
              :total="count"
              :page-sizes="[10, 20, 30, 50]"
              layout="total, sizes, prev, pager, next, jumper"
              @size-change="handlePageSizeChange"
              @current-change="handleCurrentPageChange"
            />
          </div>
          </div>
  
          <!-- 新增分页组件 -->
        
        </div>
      </div>

   <el-dialog
      v-model="dialogVisible2"
      :title="titleName"
      width="50%"
      :before-close="handleClose"
    >
      <div class="tblas">
        <div style="margin-top: 18px">
          <span>套餐名称</span>
          <div style="margin-top: 8px">
            <el-input
              style="width: 202px"
              v-model="form.name"
              placeholder="请输入名称"
              clearable
            />
          </div>
        </div>
        <div style="margin-top: 18px">
          <span>套餐价格</span>
          <div style="margin-top: 8px">
            <el-input
              style="width: 202px"
              v-model="form.price"
              placeholder="请输入价格"
              clearable
            />
          </div>
        </div>
        <div style="margin-top: 18px">
          <span>赠送级别</span>
          <div style="margin-top: 8px;position: relative;left: -8px;">
            <el-select v-model="form.level_id" class="m-2" >
              <el-option
                v-for="item in jibieDate"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </div>
        </div>
        <div style="margin-top: 18px">
          <span>分站版本</span>
          <div style="margin-top: 8px;position: relative;left: -8px;">
            <el-select v-model="form.vip_type" class="m-2" >
              <el-option
                v-for="item in banbenList"
                :key="item.value"
                :label="item.lable"
                :value="item.value"
              />
            </el-select>
          </div>
        </div>
        <div style="margin-top: 18px">
          <span>状态</span>
          <div style="margin-top: 8px">
            <el-switch v-model="form.status"  />
          </div>
        </div>
      </div>
         
          <div style="margin-top: 18px">
            <div>
          <span>升级佣金配置</span>
          <el-button
            type="primary"
            @click="addList"
            size="small"
            style="margin-left: 12px"
            >添加分佣</el-button
          >
        </div>
        <el-radio-group v-model="type" style="position: relative; top: 3px">
          <el-radio :label="2">按比例</el-radio>
          <el-radio :label="1">按金额</el-radio>
        </el-radio-group>
        <div
          v-for="(item, index) in commissionList"
          :key="index"
          style="margin-top: 12px"
        >
          <div>{{ index + 1 }}
            级佣金配置
            <el-button @click="btnDetial(index)" type="danger" size="small" style="margin-left: 12px;" >删除</el-button>
          </div>
         
          <el-input-number
            style="margin-top: 12px"
            :min="0"
            v-model="item.commission"
          />
        </div>
        </div>
        <el-checkbox
      v-model="checkAll"
      :indeterminate="isIndeterminate"
      @change="handleCheckAllChange"
    >全选</el-checkbox>
    <el-checkbox-group
      v-model="checkedTaocan"
      @change="handleCheckedTaocanChange"
    >
      <el-checkbox 
        v-for="item in taocanList" 
        :key="item.value"
        :label="item.value"
      >
        {{ item.lable }}
      </el-checkbox>
    </el-checkbox-group>









      <template #footer>
        <span class="dialog-footer">
          <el-button @click="dialogVisible2 = false">取消</el-button>
          <el-button type="primary" @click="openOk">
            确定
          </el-button>
        </span>
      </template>
    </el-dialog>
    </div>
  </template>
  
  <script lang="ts" setup>
  import { Plus } from '@element-plus/icons-vue'
  import Quill from 'quill';
  import 'quill/dist/quill.snow.css'; // 引入样式
  import type { UploadProps } from 'element-plus'
  import {
    uploads
  } from "~/base/api/product/productList.ts";
  const editorContainer =ref("")
  import { getMealList,setMealStatus,getSupVipType,updateMealStatus,
    userLevelList,vipRuleList
  } from "~/base/api/fenzhan/taocan.ts";

  import {
    PictureFilled,
    ArrowDown,
    CopyDocument,
    Picture,
    ArrowUp,
  } from "@element-plus/icons-vue";
  import { reactive, ref, onMounted, onBeforeUnmount } from "vue";
  import axios from "axios";
  import { Loading } from "@element-plus/icons-vue";
  import {
    ElMessageBox,
    ElMessage,
    ElLoading,
    componentSizeMap,
  } from "element-plus";
  import { range } from "lodash-es";
  import { select } from "radash";
  import order from "@/router/static-routes/order";
  import { Row } from "element-plus/lib/components/table-v2/src/components/index.js";
  const names = ref(0);
  const dialogVisible2 = ref(false);
  const banbenList=ref([])
  const vipRuleList2=ref([])
  const name=ref("")
  const type=ref(1)
  const currentPage=ref(1)
  const commissionList=ref([])
  const count=ref(0)
  const pageSize=ref(10)
  const taocanList=ref([
  {
      value:1,
      label:'金额'
    },
    {
      value:2,
      label:'百分百'
    }
  ])
  const options=ref([
    {
      value:1,
      label:'金额'
    },
    {
      value:2,
      label:'百分百'
    }
  ])
  const listDate=ref([
  {
    level_id: 0 ,
    type: 1,
    price:''
    }
  ])
  const level_id =ref(0)
  const form=ref({
    name:"",
    id:"",
    price:"",
    level_id:"",
    vip_type:"",
    status:false,
    commission_config:[],
    vipRuleList:[],
  })
  const actives=ref(0)
  const titleName=ref('编辑')
  const dialogVisible = ref(false);

  const imgShow = ref(false);
  // 图片预览相关状态

  const drawer = ref(false);
  const tabname = ref(0);



const dataList =ref([])

//新增价格
function addList() {
  // 计算下一条的 level_id（当前最大 id +1）
  console.log("2222", commissionList.value);
  const nextLevelId =
    commissionList.value.length > 0
      ? Math.max(...commissionList.value.map((item) => item.level_id)) + 1
      : 1;

  let parm = {
    level_id: nextLevelId, // 自动递增
    commission: "", // 新增时 commission 为空
  };

  commissionList.value.push(parm);
  console.log("当前列表数据:", commissionList.value);
}





//删除
function btnDetial(e){
  commissionList.value.splice(e,1)
}
//获取套餐权限
function vipRuleLists(){
  vipRuleList().then((res)=>{
    console.log('套餐权限',res)
    taocanList.value=res.data
  })
}


const checkAll = ref(false)
const isIndeterminate = ref(true)
// 初始选中 value=1 和 value=2 的项
const checkedTaocan = ref([]) 
const handleCheckAllChange = (val: boolean) => {
  checkedTaocan.value = val 
    ? taocanList.value.map(item => item.value) // 全选时获取所有value数组
    : [] // 取消全选时清空
  isIndeterminate.value = false
}
const handleCheckedTaocanChange = (value: number[]) => {
  const checkedCount = value.length
  const totalCount = taocanList.value.length
  
  checkAll.value = checkedCount === totalCount
  isIndeterminate.value = checkedCount > 0 && checkedCount < totalCount
  console.log('handleCheckedTaocanChange',checkedTaocan.value)
}

//清空
function celars(){
  form.value.name=''
  form.value.id=''
  form.value.price=''
  form.value.level_id=''
  form.value.vip_type=''
  form.value.status=false
  form.value.commission_config=[]
  form.value.vipRuleList=[]
     
      
}

//保存
function openOk() {
  form.value.vipRuleList = checkedTaocan.value
  form.value.commission_config = commissionList.value
  
  setMealStatus(form.value).then((res) => {
    if(res.code == 200){
      // 1. 确保调用了正确的列表加载函数
      getSetdocking()
      
      // 2. 重置表单和选择状态
      celars()
      checkedTaocan.value = []
      listDate.value = [{
        level_id: 0,
        type: 1,
        price: ''
      }]
      
      // 3. 关闭对话框
      dialogVisible2.value = false
      
      ElMessage.success(res.msg)
    } else {
      ElMessage.error(res.msg)
    }
  }).catch(err => {
    ElMessage.error(err.msg)
  })
}




  //状态
  function getChange(e) {
    
    updateMealStatus({id:e.id}).then((res)=>{
      if(res.code ==200){
        getSetdocking()
        ElMessage({
        message: res.msg,
        type: 'success',
      })
      }else{
        ElMessage({
        message: res.msg,
        type: 'warning',
      })
      }
      
    })
  }

  
  // 删除方法
  const handleDelete = (id: string) => {
    ElMessageBox.confirm("确定要删除这条记录吗?", "警告", {
      confirmButtonText: "确定",
      cancelButtonText: "取消",
      type: "warning",
    })
      .then(() => {
        // 这里调用删除API
        delOrder({ id: id }).then(() => {
          ElMessage.success("删除成功");
          //fetchData(); // 刷新列表
          getSetdocking();
        });
      })
      .catch(() => {
        ElMessage.info("已取消删除");
      });
  };
  
  // 查询处理
  const handleQuery = () => {
    currentPage.value = 1; // 重置为第一页
    getSetdocking();
  };
  
  // 重置查询条件
  const handleReset = () => {
   
    handleQuery();
  };
  // 分页尺寸变化
  const handlePageSizeChange = (size: number) => {
    pageSize.value = size;
    getSetdocking();
  };
  
  // 页码变化
  const handleCurrentPageChange = (page: number) => {
    currentPage.value = page;
    getSetdocking();
  };
  const jibieDate=ref([])
  //级别
  function userLevelLists(){
    userLevelList().then((res)=>{
      console.log('界别',res)
      jibieDate.value=res.data
    })
  }
    //版本
    function getSupVipTypes(){
      getSupVipType().then((res)=>{
   
      banbenList.value=res.data
    })
  }
  //初始化
  onMounted(() => {
    getSetdocking();
    userLevelLists()
    getSupVipTypes()
    vipRuleLists()
  });
  //新增打开弹框
  function btnAdd(){
      dialogVisible2.value=true
      titleName.value='新增'
     
      commissionList.value=[]
  }
  function btnEditn(e){
    dialogVisible2.value=true
    titleName.value='编辑'
      form.value=e
      checkedTaocan.value=e.vipRuleList
      commissionList.value=e.commission_config
     

  }
  //升级任务
  function shenji(){
      dialogVisible2.value=true
  }
  //查询
  function submitSee() {
    console.log("erer");
    getSetdocking();
  }
   //重置
   function onSubmit() {
    name.value=''
    getSetdocking();
  }
 
  
  //列表
  function getSetdocking() {
    // 显示 loading
    const loadingInstance = ElLoading.service({
      target: ".el-dialog", // 针对对话框区域
      lock: true,
      text: "正在加载数据中...",
      background: "rgba(0, 0, 0, 0.7)",
    });
    let parm = {
      page: currentPage.value,
      limit: pageSize.value,
      name:name.value
    };
    getMealList(parm)
      .then((res) => {
        if (res.code == 200) {
          dataList.value = res.data.data;
          count.value=Number(res.data.count)
        }
      })
      .finally(() => {
        // 数据加载完成后关闭 loading
        loadingInstance.close();
      });
  }
  </script>
  <style>
  .el-input.is-disabled .el-input__wrapper {
    background: white !important;
  }
  </style>
  <style scoped>
  .deep .el-input.is-disabled .el-input__wrapper {
    background: white !important;
  }
  .order-titme {
  }
  
  .iconss {
    color: #999;
    cursor: pointer;
    position: relative;
    top: 3px;
  }
  .actives{
    background-color: #f0f7ff !important;
  }
  .iconss:hover {
    color: #1890ff;
  }
  
  .icons {
    font-size: 21px !important;
    position: relative !important;
    top: 18px !important;
    padding-right: 28px !important;
    left: 12px !important;
  }
  
  .icons2 {
    font-size: 50px !important;
    position: relative !important;
    top: 10px !important;
    padding-right: 28px !important;
    left: 12px !important;
  }
  
  .sanfang {
    margin-left: 12px;
    font-size: 11px;
    color: #1890ff;
    cursor: pointer;
  }
  .lie-top {
    display: flex;
    justify-content: center;
  }
  .lie-input {
    width: 100%;
    background-color: white;
  }
  .orders-names {
  }
  
  .order-names {
    display: flex;
    margin-top: 15px;
  }
  
  .order-information {
  }
  
  .order-detail {
    height: 142px;
    border-bottom: 1px solid #3333;
    margin-top: 10px;
    font-size: 13px;
    padding-bottom: 14px;
  }
  
  .activeTab {
    border-bottom: 1px solid #1890ff !important;
    color: #1890ff !important;
  }
  
  .activeTabs {
    border-bottom: 1px solid #1890ff !important;
    color: #1890ff !important;
  }
  
  .area-tab {
    display: flex;
    position: relative;
    left: -28px;
  }
  .area-tabs {
    height: 50vh;
    overflow: auto;
  }
  
  .area-name {
    margin-left: 30px;
    cursor: pointer;
    height: 31px;
  }
  
  .areas-header {
    height: 32px;
    border-bottom: 1px solid #3333;
    width: 100%;
  }
  
  .bianhao {
    margin-top: 16px;
    margin-left: 9px;
    font-size: 13px;
  }
  
  .right-name {
    margin-left: 8px;
  }
  
  .areas {
    width: 98%;
    margin: 0 auto;
  
    margin-top: 40px;
  }
  
  .quxiao {
    /* color: white;
            background-color: rgba(0, 0, 0, .65); */
    font-size: 12px;
    margin-top: 8px;
  }
  
  .type-name {
    margin-left: 80px;
  }
  .imgs {
    width: 70px;
    height: 70px;
    position: relative;
    top: 4px;
    border-radius: 6px;
  }
  .area-left{
    width: 24%;
  }
  .lefts{
    width: 84%;
    border: 1px solid #3333;
    height: 300px;
    margin-left: 18px;
    position: relative;
    top: 23px;
    border-radius:8px;
  }
  .xx {
    position: absolute;
    right: -4px;
    color: red;
    top: -7px;
    cursor: pointer;
  }
  .types {
    display: flex;
    margin-top: 30px;
    position: relative;
  
    font-size: 13px;
  }
  .inputs2 {
    width: 60vw;
    padding-left: 12px;
  }
  
  .imgsleft {
    width: 70px;
    height: 70px;
  }
  
  .img-left {
    width: 9%;
  }
  
  .img-content {
    margin-top: 12px;
    display: flex;
  }
  
  .contents-title {
    display: flex;
    margin-top: 14vh;
    justify-content: space-between;
  }
  
  .unbers {
    color: #1890ff;
    background-color: #e8f4ff;
    border-color: #d1e9ff;
    margin-left: 12px;
    font-size: 11px;
    height: 22px;
    width: 56px;
    text-align: center;
  }
  
  .ordername {
    color: #333;
    border: 1px solid #3333;
    border-color: #333;
    /* padding: 1px 9px 1px 9px; */
    margin-left: 12px;
    height: 22px;
    width: 56px;
    text-align: center;
    font-size: 11px;
    line-height: 22px;
  }
  
  .kami {
    color: #13ce66;
    background-color: #e7faf0;
    border-color: #d0f5e0;
    font-size: 11px;
    height: 22px;
    width: 56px;
    text-align: center;
  }
  a {
    text-decoration: none;
    color: inherit;
  }
  .shu2 {
    width: 3px;
    height: 20px;
    background-color: #1890ff;
    position: relative;
    top: 25px;
    left: -8px;
  }
  .zhuangtai {
    display: flex;
    margin-top: 12px;
    font-size: 13px;
  }
  .imgs {
    width: 50px;
    height: 50px;
    position: relative;
    top: 4px;
    border-radius: 6px;
  }
  .right-header{
    width: 100%;
    border: 1px solid #3333; 
    height: 80px;
  }
  .rights{
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin: 0 auto;
    margin-top: 26px;
  }
  .shoyue{
    width: 72%;
    margin: 0 auto;
    margin-top: 12px;
    padding-left: 30px;
    padding-bottom: 2px;
    padding-top: 2px;
    cursor: pointer;
  }
  .left-header{
    height: 60px;
    width: 100%;
    line-height: 60px;
    border-bottom: 1px solid #3333;
   
  }
  .table-name {
    color: #1890ff;
    width: 60px;
    margin: 0 auto;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    height: 23px;
    line-height: 23px;
  }
  
  .table-name2 {
    border-color: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 3px 5px 3px 9px;
    cursor: pointer;
  }
  
  .footerss {
    display: flex;
    width: 96%;
    margin: 0 auto;
    font-size: 13px;
  }
  .imglists {
    display: flex;
    margin-left: 9px;
    position: relative;
  }
  .footers {
    width: 98%;
    border: 1px solid #3333;
    margin: 0 auto;
    height: 100px;
    margin-top: 25px;
  }
  
  .tabname {
    color: #409eff !important;
    border-bottom: 2px solid #409eff !important;
  }
  
  .tab-name {
    margin-left: 18px;
    cursor: pointer;
    height: 30px;
  }
  .inputs {
    margin-top: 12px;
  }
  .header-area {
    display: flex;
    position: relative;
    left: -18px;
    top: 1px;
  }
  
  .names {
    background: #409eff !important;
    color: white !important;
    border: none !important;
  }
  
  .jiaoyi {
    background-color: #13ce66;
  }
  
  .header-name {
    border-radius: 20px;
    padding: 3px 16px 3px 16px;
    border: 1px solid #9999;
    margin-left: 12px;
    font-size: 13px;
    cursor: pointer;
  }
  
  .headers {
    display: flex;
    padding-bottom: 12px;
  }
  
  .m-2 {
    width: 160px;
  }
  
  .pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
  }
  
  .configurations {
    margin-top: 12px;
  }
  
  .configuration-area {
  }
  
  .dialog-footer {
    margin: 0 auto;
    margin-top: 30px;
    text-align: center;
  }
  
  .orders-name {
    margin-top: 12px;
  }
  
  .orders {
    margin-left: 12px;
  }
  
  .order-area {
    width: 98%;
    padding-bottom: 12px;
    border: 1px solid #409eff;
    background-color: #e8f4ff;
  }
  .zanwu {
    display: flex;
    justify-content: center;
    position: relative;
    top: 25vh;
  }
  .tabs-area {
    margin-top: 12px;
  }
  .he {
    margin-left: 12px;
    color: #1890ff;
    cursor: pointer;
  }
  .diolog-content {
  }
  
  .shu {
    width: 3px;
    height: 20px;
    background-color: #1890ff;
    position: relative;
    top: 19px;
  }
  
  .shuaxin {
    font-size: 12px;
    color: #409eff;
    padding-right: 2px;
    cursor: pointer;
  }
  
  .table-area {
    width: 98%;
    margin: 0 auto;
    margin-top: 30px;
  }
  
  .tabs-price {
    border: 1px solid #3333;
    padding: 5px 12px 3px 12px;
  }
  
  .timeShow {
    color: red !important;
  }
  
  .tabs {
    margin-left: 10px;
  }
  
  .tab-header {
    display: flex;
    width: 100%;
  }
  .info-area {
    display: flex;
    white-space: nowrap;
    width: 88%;
  
    text-overflow: ellipsis;
    white-space: nowrap;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  
    cursor: pointer;
  }
  .avatar-uploader .el-upload {
    border: 1px dashed var(--el-border-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--el-transition-duration-fast);
  }
  .avatar-uploader .avatar {
    width: 178px;
    height: 178px;
    display: block;
    text-align: center;
  }
  .avatar-uploader .el-upload:hover {
    border-color: var(--el-color-primary);
  }
  .custom-editor {
  flex-grow: 1; /* 编辑区域填充剩余空间 */
  }
  .el-icon.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    text-align: center;
  }
  .avatar-uploader {
    position: relative;
  
    left: 10px;
    width: 80px;
    height: 80px;
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
  }
  .avatar-uploader:hover {
    border-color: #409eff;
    background-color: #f5f7fa;
  }
  .info-area2 {
  }
  .info-area:hover {
    color: #1890ff;
  }
  .area {
    width: 100%;
    background-color: white;
    padding-bottom: 28px;
    margin-top: 18px;
    padding-top: 14px;
    display: flex;
  }
  
  .content {
    width: 96%;
    margin: 0 auto;
    height: 80vh;
    margin-top: 26px;
  }
  
  .header {
    background-color: white;
    padding: 17px 0 1px 12px;
    border-radius: 8px;
  }
  
  .is-loading {
    animation: rotating 2s linear infinite;
  }
  
  @keyframes rotating {
    0% {
      transform: rotate(0deg);
    }
  
    100% {
      transform: rotate(360deg);
    }
  }
  
  /* 基础响应式设置 */
  .content {
    width: 96%;
    margin: 0 auto;
    margin-top: 26px;
    padding-bottom: 20px;
  }
  
  /* 表格区域响应式 */
  .table-area {
    width: 100%;
    margin: 0 auto;
    margin-top: 20px;
    overflow-x: auto;
  }
  
  /* 分页容器 */
  .pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    overflow-x: auto;
  }
  
  /* 对话框内容 */
  .diolog-content {
    padding: 10px;
  }
  
  /* 标签页区域 */
  .tabs-area {
    margin-top: 12px;
  }
  
  /* 配置区域 */
  .configurations {
    margin-top: 12px;
  }
  
  /* 对话框底部按钮 */
  .dialog-footer {
    margin: 20px auto 0;
    text-align: center;
  }
  .nameshopping {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 70px;
    cursor: pointer;
    text-align: center;
  }
  .nameshopping:hover {
    color: #1890ff;
  }
  /* 订单区域 */
  .order-area {
    width: 100%;
    padding: 12px;
    border: 1px solid #409eff;
    background-color: #e8f4ff;
    box-sizing: border-box;
  }
  .tblas{
    
  }
  /* 刷新按钮样式 */
  .shuaxin {
    font-size: 12px;
    color: #409eff;
    padding-right: 2px;
    cursor: pointer;
  }
  
  /* 加载动画 */
  .is-loading {
    animation: rotating 2s linear infinite;
  }
  
  @keyframes rotating {
    0% {
      transform: rotate(0deg);
    }
  
    100% {
      transform: rotate(360deg);
    }
  }
  .tupians {
    display: flex;
  }
  /* 响应式调整 */
  @media (max-width: 768px) {
    /* 头部表单 */
    .header {
      padding: 10px;
    }
  
    /* 表单项目 */
    .el-form-item {
      width: 100%;
      margin-right: 0;
      margin-bottom: 10px;
    }
  
    /* 标签页 */
    .el-tabs {
      overflow-x: auto;
    }
  
    /* 对话框内容 */
    .diolog-content {
      padding: 5px;
    }
  
    /* 输入框宽度 */
    .el-input {
      width: 100% !important;
    }
  
    /* 表格操作按钮 */
    .el-table-column--fixed-right .el-button {
      margin-bottom: 5px;
    }
  
    /* 标签页头 */
    .tab-header {
      flex-direction: column;
    }
  
    .tabs {
      margin: 5px 0;
    }
  
    /* 对话框标题 */
    .el-dialog__title {
      font-size: 16px;
    }
  }
  
  /* PC端特定样式 */
  @media (min-width: 769px) {
    .content {
      /* max-width: 1200px; */
    }
  
    .table-area {
      width: 98%;
    }
  
    .diolog-content {
      min-width: 500px;
    }
  
    .el-form--inline .el-form-item {
      margin-right: 10px;
    }
  }
  </style>
  